move private imports from testing into tests/__init__.py#1205
move private imports from testing into tests/__init__.py#1205twoertwein merged 1 commit intopandas-dev:mainfrom
Conversation
|
Thank you @Dr-Irv ! Just had a quick look: the changes look great! I will review/approve it later today. I assume we are still allowed to import from _typing inside the stubs? |
Yes. The issue that came up with pyright (and they removed the feature in 1.1.400 at my request - but want to put it back), is that if you installed So this PR is "centralizing" all of the imports from the private module, except for ones that I am proposing to put somewhere else. |
twoertwein
left a comment
There was a problem hiding this comment.
Looks great and the new pyright feature seems also useful to avoid using private APIs! I wouldn't be surprised if some people directly import from _libs.
In preparation for an eventual change in
pyrightthat would ban private imports, I have moved the private imports for the tests intotests/__init__.py.Also will be working to make some of the current private imports public as reflected in the discussion here:
pandas-dev/pandas#55231 (comment)